import request from '@/util/request'

/**
 * taskProgressAdd 添加任务进度
 * @param id
 */
export const taskProgressAdd = (data: any) => {
  return request({
    url: '/taskProgress',
    method: 'POST',
    data: data
  })
}


/**
 * taskProgressRemove 通过ID删除任务进度
 * @param id
 */
export const taskProgressRemove = (id: number) => {
  return request({
    url: '/taskProgress',
    method: 'DELETE',
    params: {
      id: id
    }
  })
}

/**
 * taskProgressModify 修改任务进度
 * @param data TaskProgress修改内容
 */
export const taskProgressModify = (data: any) => {
  return request({
    url: '/taskProgress',
    method: 'PUT',
    data: data
  })
}


/**
 * taskProgressFind 查询任务进度列表
 * @param pageSize 分页大小
 * @param pageNum 当前页
 */
export const taskProgressFind = (data: any, pageSize: number,pageNum:number) => {
  return request({
    url: '/taskProgress/list',
    method: 'GET',
    params: {
      ... data,
      pageNum: pageNum,
      pageSize: pageSize,
    }
  })
}


/**
 * taskProgressFindById 查找任务进度byId
 * @param id
 */
export const taskProgressFindById = (id: number) => {
  return request({
    url: '/taskProgress',
    method: 'GET',
    params: {
      id: id
    }
  })
}
